import { pubRequire } from '@utils/public'
const baseUrl = '/protocols'
// 获取协议列表
export function getSearchList(obj, callBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callBack, errBack)
}
// 添加单个协议
export function addAgreement(obj, callBack, errBack) {
  return pubRequire('post', `${baseUrl}`, obj, callBack, errBack)
}
// 修改单个协议
export function eidtAgreement(id, obj, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}`, obj, callBack, errBack)
}
// 禁用协议
export function stopApi(id, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/disable`, '', callBack, errBack)
}
// 启用协议
export function openApi(id, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/enable`, '', callBack, errBack)
}
